import Vue from 'vue'
import Router from 'vue-router'

import HomeContainer from '../components/tarbar/HomeContainer.vue' 
import MemberContainer from '../components/tarbar/MemberContainer.vue' 
import ShoperContainer from '../components/tarbar/ShoperContainer.vue' 
import SearchContainer from '../components/tarbar/SearchContainer.vue' 
import newsList from '../components/news/newsList.vue'
import newsInfo from '../components/news/newsInfo.vue'
import photoLIst from '../components/photo/PhotoList.vue'
import photoInfo from '../components/photo/PhotoInfo.vue'
import goodsList from '../components/good/GoodsList.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/home',
    },
    {
      path: '/home',
      name: 'home',
      component: HomeContainer,
    },
    {
      path: '/home/newsList',
      name: 'newsList',
      component: newsList
    },
    {
      path: '/home/newsInfo/:id',
      name: 'newsInfo',
      component: newsInfo,
    },
    {
      path: '/home/photoLIst',
      name: 'photoLIst',
      component: photoLIst,
    },
    {
      path: '/home/photoInfo/:id',
      name: 'photoInfo',
      component: photoInfo,
    },
    {
      path: '/home/goodsList',
      name: 'goodsList',
      component: goodsList,
    },
    {
      path: '/member',
      name: 'member',
      component: MemberContainer
    },
    {
      path: '/shoper',
      name: 'shoper',
      component: ShoperContainer
    },
    {
      path: '/search',
      name: 'search',
      component: SearchContainer
    },
  ],
  linkActiveClass: 'mui-active'
})
